package com.king.designpatterns.hybriddesignpattern.hybriddesignpattern.observingtheintermediarypatterns;

/**
 * 具体事件处理类 - 乞丐
 *
 * @author king
 * @date 2021-06-15 13:47
 */
public class Beggar extends EventCustomer{

    public Beggar() {
        super(ProductEventType.DEL_PRODUCT);
    }

    @Override
    public void exec(ProductEvent event) {
        Product p = event.getSource();
        // 事件类型
        ProductEventType type = event.getType();
        System.out.println("乞丐处理事件：" + p.getName() + "销毁，事件类型=" + type);
    }
}
